<?

include_once "accesscontrol.php";

$q = "select * from job_post where job_id = \"$_GET[id]\" ";
$r = mysql_query($q) or die(mysql_error());
$a = mysql_fetch_array($r);

$js = $_GET[job_id];

$q2 = "select * from job_employer_info where ename = \"$a[ename]\"";
$r2 = mysql_query($q2) or die(mysql_error());
$a2 = mysql_fetch_array($r2);


$show_category = str_replace("|", ", ", $a[JobCategory]);
?>

<br>
<table align=center width=400 class=BlackText border=0>
<tr>
	<td colspan=2 align=center class=HeaderClass>Details Job Posted<br><br></td>
</tr>

<tr>
	<td width=100 align=right><b> Position: </b></td>
	<td width=300> <?=$a[position]?> </td>
</tr>

<tr>
	<td align=right><b> Job category: </b></td>
	<td> <?=$show_category?> </td>
</tr>

<tr>
	<td align=right><b> Target: </b></td>
	<td><?=career_level("", $a[j_target] - 1);?></td>
</tr>

<tr>
	<td align=right><b> Salary: </b> </td>
	<td> <?=$a[salary]?> / <?=$a[s_period]?> </td>
</tr>

<tr>
	<td align=right><b> Short Description: </b> </td>
	<td> <?=$a[short_desc]?> </td>
</tr>

<tr>
	<td align=right valign=top><b> Responsibilities: </b></td>
	<td> <?=nl2br($a[responsibilities]);?> </td>
</tr>

<tr>
	<td align=right valign=top><b> Requirements: </b></td>
	<td> <?=nl2br($a[requirements]);?> </td>
</tr>

<tr>
	<td align=right><b>Job location: </b></td>
	<td> <?=$a[CompanyCountry]?></td>
</tr>

<tr>
<? 

	$day = date(d);
	$month = date(m);
	$year = date(Y);

	$EXdate = "$a[EXyear]"."-"."$a[EXmonth]"."-"."$a[EXday]";
	$dnes = "$year"."-"."$month"."-"."$day";

	$qd = "select to_days('$EXdate') - to_days('$dnes')";
	$rqd = mysql_query($qd) or die(mysql_error());
	$ex13 = mysql_fetch_array($rqd);


?>
	<td colspan=2><b>This job offer expire after <?=$ex13[0]?> day(s).</td>
</tr>

</table>

<? include_once('../footer.php'); ?>